import javax.swing.JComponent;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;

public class ThreeButtonComponent extends JComponent
{
   public void paintComponent(Graphics g)
   {
      Graphics2D g2 = (Graphics2D) g;
      // your work here
      public static void main(String[] args)
   {
      JFrame frame = new JFrame();
      frame.setSize(270, 200);
      frame.setTitle("Three Button Viewer");
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      ThreeButtonComponent component = new ThreeButtonComponent();
      frame.add(component);
      frame.setVisible(true);
   }
   }
}